<?php

use yii\db\Migration;

class m170926_043805_create_walletest extends Migration
{
    public function safeUp()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }
        $this->createTable('{{%walletest}}', [
            'id'=> $this->primaryKey() . ' COMMENT \'自动编号\'',
            'telephone' => $this->string(255)->defaultValue(NULL) . ' COMMENT \'手机号码\''
        ]);
    }

    public function safeDown()
    {
        $this->dropTable('{{%walletest}}');
    }
}
